package com.authority.dao;

import java.util.List;
import org.apache.ibatis.annotations.Param;

import com.authority.entry.AuthRoleMenuDO;

public interface AuthRoleMenuDAO {

	/**
	 * 根据角色id查询
	 * @return
	 */
	List<AuthRoleMenuDO> queryAuthRoleMenuByRoleIdAndSysId(@Param("roleId")Long roleId,@Param("sysId")Long sysId);

	/**
	 * 批量插入
	 * @param map
	 * @return
	 */
	void batchInsertAuthRoleMenu(List<AuthRoleMenuDO> map);

	/**
	 * 根据角色id批量删除
	 * @param ids
	 * @return
	 */
	int batchDeleteAuthRoleMenuByRoleIdAndSysId(@Param("roleId")Long roleId,@Param("sysId")Long sysId);
	
	/**
	 * 根据系统id和菜单id查询
	 * @param sysId
	 * @param menuId
	 * @return
	 */
	List<AuthRoleMenuDO> queryRoleMenuBySysIdAndMenuId(@Param("sysId")Long sysId,@Param("menuId")Long menuId);

	/**
	 * 根据菜单id批量删除
	 * @param menuId
	 * @param sysId
	 * @return
	 */
	int batchDeleteAuthRoleMenuByMenuIdAndSysId(@Param("menuId")Long menuId,@Param("sysId")Long sysId);
	
	int batchDeleteAuthRoleMenuByMenuIdsAndSysId(@Param("menuIds")String menuIds,@Param("sysId")Long sysId);
	
	/**
	 * 根据sysId查
	 * @param menuId
	 * @param sysId
	 * @return
	 */
	List<AuthRoleMenuDO> queryRoleMenuBySysId(Long sysId);
}
